package phone.qyg.com.qyg.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 作者：lblbh on 2017/11/30 11:54
 * 邮箱：lanbuhan@163.com
 * 功能：场馆详情
 */
public class VenueDetail extends Base implements Parcelable {

    public int star;
    public int actCount;
    public int isCollection;
    public String phone;
    public String address;
    public String latitude;
    public String offHours;
    public String venueDesc;
    public String longitude;
//    public String shareAddress;
    public List<Roll> imgList;
    public List<Activity> actList;
    public List<VenueActRoom> venueActRoom;
    /**
     *  "id": 14,
     "address": "详细地址",
     "star": 0,  //评级星数
     "title": "场馆名称612",  //名称
     “shareAddress” :
     ”http://domain:port/actinfo/sportcontentview/11.shtml”,//分享地址
     "offHours": "8点",   //营业时间
     "phone": "18701691274",   //联系电话
     "longitude": “116.2343”, // 经度
     "latitude": “40.123123”, // 纬度
     “isCollection”:0,     //是否收藏 0-为收藏，1-已收藏
     "fixImgUrl":
     "http://domain:port/data/profile/jpg/ee23.jpg", //缩略图
     "imgList": [ //轮播图集合
     {
     "fixImgUrl": "http://192.168.1.214:8080/data/data/venuethumb//2017/03/18/996e3d24-6ed8-4849-82d2-ce178fedb9ac_200x200.jpg",
     "id": 10
     },
     .....
     ],
     “actCount”:5 //活动数量
     “actList”:[  //场馆活动
     {
     “id”:1 //活动id
     “title”:”活动名称”
     "fixImgUrl": "http://192.168.1.214:8080/data/data/venuethumb//2017/03/18/996e3d24-6ed8-4849-82d2-ce178fedb9ac_200x200.jpg", //缩略图
     “startTime”:”2017-11-15” //活动开始时间
     “status”:1               //活动状态值
     “statusName”:”预约中”    //活动状态名称
     “applyBtn”:1  //申请按钮
     “applyBtnName”:”预约” //按钮文字
     }
     ]
     }
     ]
     }

     “venueActRoom”:[  //活动室列表
     {
     “id”:1 //活动室id
     “title”:”活动室名称”
     “content”:”描述信息”
     ]
     }
     ],

     */

    public VenueDetail(){}

    @SuppressWarnings("unchecked")
    public VenueDetail(Parcel in) {
        id = in.readInt();
        more = in.readString();
        title = in.readString();
        address = in.readString();
        latitude = in.readString();
        longitude = in.readString();
        fixImgUrl = in.readString();
        shareAddress = in.readString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(more);
        dest.writeString(title);
        dest.writeString(address);
        dest.writeString(latitude);
        dest.writeString(longitude);
        dest.writeString(fixImgUrl);
        dest.writeString(shareAddress);
    }


    public static final Creator<VenueDetail> CREATOR = new Creator<VenueDetail>() {
        @Override
        public VenueDetail[] newArray(int size) {
            return new VenueDetail[size];
        }

        @Override
        public VenueDetail createFromParcel(Parcel in) {
            return new VenueDetail(in);
        }
    };
}
